(function () {
    return {
        before: function (data) {
            return data;
        },
        after: function () {
            var _this = this;
            var onLoadSuccess = function () {
            }
            bootstrapTable(_this.$(".bootstrapTable"), {
                url: 'bannerSetting/findPage',
                columns: [
                    {
                        field: 'selectItem',
                        checkbox: true,
                    },
                    {
                        field: 'id',
                        title: '主键',
                        visible: false,
                        sortable: true
                    },
                    {
                        field: 'imgUrl',
                        title: '图片url',
                        sortable: true,
                        formatter: function (v) {
                            return "<img src='" + v + "' style='width: 200px;'/>"
                        }
                    },
                    {
                        field: 'type',
                        title: '跳转类型',
                        sortable: true,
                        formatter: function (v) {
                            if (v == 0) {
                                return "无跳转"
                            } else if (v == 1) {
                                return "内链"
                            } else if (v == 2) {
                                return "外链"
                            }
                            return "-";
                        }
                    },
                    {
                        field: 'groupType',
                        title: '组类型',
                        sortable: true
                    },
                    {
                        field: 'createDate',
                        title: '创建时间',
                        sortable: true
                    },
                    {
                        field: 'title',
                        title: '标题',
                        sortable: true
                    },
                    {
                        field: 'operate',
                        title: '操作',
                        formatter: function (value, row, index) {
                            return bootstrapTableBtn(value, row, index, row.id).joinBtn("e-go", "详情", "href='module/bannerSetting/info?id=" + row.id + "'").joinBtn("e-go", "修改", "href='module/bannerSetting/update?id=" + row.id + "'").joinBtn("e-table-delete", "删除", 'url="bannerSetting/delete" data-id="' + row.id + '"')
                                .toString();
                        }
                    }
                ],
                onLoadSuccess: onLoadSuccess
            });
        }
    }
});
